public class Table {
    private TableTypeEnum type;
    private String color;
//    使用年限
    private int usefulLife;
    public Table(TableTypeEnum type,String color,int usefulLife){
        this.type=type;
        this.color=color;
        this.usefulLife=usefulLife;
    }

    public TableTypeEnum getType() {
        return type;
    }

    public void setType(TableTypeEnum type) {
        this.type = type;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getUsefulLife() {
        return usefulLife;
    }

    public void setUsefulLife(int usefulLife) {
        this.usefulLife = usefulLife;
    }
    public boolean equals(Object object){
        if(this==object){
            return true;
        }if(!(object instanceof Table)){
            return false;
        }
        Table table=(Table) object;
        return this.type.equals(table.type)&&this.color.equals(table.color)&&this.usefulLife==table.usefulLife;
    }

    @Override
    public String toString() {
        return "Table{" +
                "type=" + type +
                ", color='" + color + '\'' +
                ", usefulLife=" + usefulLife +
                '}';
    }
}
